﻿using System;
using System.Drawing;
using System.IO;

namespace Moonlite.Modules.Editors.ImageViewer
{
    public class BmpImageViewerLoader : ImageViewerLoader
    {
        protected override string Extension
        {
            get { return ".bmp"; }
        }

        protected override Image LoadImageCore(string path)
        {
            Image image = null;
            using (FileStream stream = new FileStream(path, FileMode.Open))
            {
                image = new Bitmap(stream);
            }

            return image;
        }
    }
}
